﻿<telerik:RadPanelBarItem x:Name="radPanelBarItem"
                         x:Class="Rio.Framework.Pages.Workflow.FlowPanelBarItem"
                         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                         xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                         xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                         xmlns:conv="clr-namespace:Rio.Framework.Pages.AppCode.Helpers.Converter" mc:Ignorable="d"
                         d:DesignHeight="300"
                         d:DesignWidth="400">

    <telerik:RadPanelBarItem.Resources>
        <conv:NotBooleanToVisibilityConverter x:Key="NotBooleanToVisibilityConverter" />

        <telerik:ContainerBindingCollection x:Key="ContainerBindings">
            <telerik:ContainerBinding PropertyName="IsExpanded"
                                      Binding="{Binding bIsExpanded, Mode=TwoWay}" />
            <telerik:ContainerBinding PropertyName="IsSelected"
                                      Binding="{Binding bIsSelected, Mode=TwoWay}" />
            <telerik:ContainerBinding PropertyName="IsDropAllowed"
                                      Binding="{Binding bIsDropAllowed, Mode=TwoWay}" />
            <telerik:ContainerBinding PropertyName="DefaultImageSrc"
                                      Binding="{Binding sImageSrc, Mode=TwoWay}" />
        </telerik:ContainerBindingCollection>

        <telerik:HierarchicalDataTemplate x:Key="TreeViewItemTemplate"
                                          ItemsSource="{Binding Items}"
                                          telerik:ContainerBinding.ContainerBindings="{StaticResource ContainerBindings}">
            <TextBlock x:Uid="{Binding iIdRepertory}"
                       Text="{Binding sText}"
                       FontWeight="{Binding TextFont}" />

        </telerik:HierarchicalDataTemplate>

    </telerik:RadPanelBarItem.Resources>

    <telerik:RadPanelBarItem.Header>
        <Grid Margin="3,3,0,3">
            <StackPanel Orientation="Horizontal">
                <Image Source="/Rio.Framework.Pages;component/Assets/Images/Entity.png"
                       Width="16"
                       Height="16" />
                <TextBlock Name="HeaderTextBlock"
                           Margin="5,0,0,0"
                           VerticalAlignment="Center" />
            </StackPanel>
        </Grid>
    </telerik:RadPanelBarItem.Header>

    <Grid x:Name="LayoutRoot">
        <telerik:RadTreeView x:Name="TreeView"
                             IsDragDropEnabled="False"
                             IsEditable="False"
                             IsExpandOnSingleClickEnabled="True"
                             IsLineEnabled="True"
                             SelectionMode="Single">
        </telerik:RadTreeView>
    </Grid>
</telerik:RadPanelBarItem>
